export default {
    data() {
        return {

        }
    },
    methods: {
        getDishDicByTypes(types) {
            let typeArray = types.split(' ')
            var map = this.$store.state.dish.dicMap
            let dicMap = []
            for (let tidx in typeArray) {
                for (let idx in map) {
                    if (map[idx].key == typeArray[tidx]) {
                        dicMap.push({'key':typeArray[tidx],'value':map[idx].value})
                    }
                }
            }
            return dicMap
        },
        // 设置模块中对象的值
        setDishDicByType(key, value) {
            console.log(value)
            this.$store.commit('dish/updateDishDicMap', { 'key': key, 'value': value })
        },
    }
}